package com.db.mylogger;

import java.io.IOException;
import org.slf4j.Logger;
import org.slf4j.Marker;

public class MyLoggerAdapter implements Logger {

	private MyLogger log;
	
	public MyLoggerAdapter(MyLogger log) {
		this.log = log;
	}
	
	public MyLoggerAdapter(String filename) throws IOException {
		this.log = new MyLogger(filename);
	}
	
	@Override
	public String getName() {
		return log.getClass().getName();
	}

	@Override
	public boolean isTraceEnabled() {
		return false;
	}

	@Override
	public void trace(String msg) {
		throw new UnsupportedOperationException();		
	}

	@Override
	public void trace(String format, Object arg) {
		throw new UnsupportedOperationException();		
	}

	@Override
	public void trace(String format, Object arg1, Object arg2) {
		throw new UnsupportedOperationException();		
	}

	@Override
	public void trace(String format, Object... arguments) {
		throw new UnsupportedOperationException();		
	}

	@Override
	public void trace(String msg, Throwable t) {
		throw new UnsupportedOperationException();		
	}

	@Override
	public boolean isTraceEnabled(Marker marker) {
		throw new UnsupportedOperationException();
	}

	@Override
	public void trace(Marker marker, String msg) {
		throw new UnsupportedOperationException();		
	}

	@Override
	public void trace(Marker marker, String format, Object arg) {
		throw new UnsupportedOperationException();		
	}

	@Override
	public void trace(Marker marker, String format, Object arg1, Object arg2) {
		throw new UnsupportedOperationException();		
	}

	@Override
	public void trace(Marker marker, String format, Object... argArray) {
		throw new UnsupportedOperationException();		
	}

	@Override
	public void trace(Marker marker, String msg, Throwable t) {
		throw new UnsupportedOperationException();		
	}

	@Override
	public boolean isDebugEnabled() {
		return true;
	}

	@Override
	public void debug(String msg) {
		if(isDebugEnabled()) {
			log.debug(msg);
		}
	}

	@Override
	public void debug(String format, Object arg) {
		if(isDebugEnabled()) {
			log.debug(format, arg);
		}
	}

	@Override
	public void debug(String format, Object arg1, Object arg2) {
		throw new UnsupportedOperationException();		
	}

	@Override
	public void debug(String format, Object... arguments) {
		throw new UnsupportedOperationException();		
	}

	@Override
	public void debug(String msg, Throwable t) {
		throw new UnsupportedOperationException();		
	}

	@Override
	public boolean isDebugEnabled(Marker marker) {
		throw new UnsupportedOperationException();
	}

	@Override
	public void debug(Marker marker, String msg) {
		throw new UnsupportedOperationException();		
	}

	@Override
	public void debug(Marker marker, String format, Object arg) {
		throw new UnsupportedOperationException();
	}

	@Override
	public void debug(Marker marker, String format, Object arg1, Object arg2) {
		throw new UnsupportedOperationException();
	}

	@Override
	public void debug(Marker marker, String format, Object... arguments) {
		throw new UnsupportedOperationException();
	}

	@Override
	public void debug(Marker marker, String msg, Throwable t) {
		throw new UnsupportedOperationException();
	}

	@Override
	public boolean isInfoEnabled() {
		return true;
	}

	@Override
	public void info(String msg) {
		if(isInfoEnabled()) {
			log.info(msg);
		}
	}

	@Override
	public void info(String format, Object arg) {
		if(isInfoEnabled()) {
			log.info(format,arg);
		}
	}

	@Override
	public void info(String format, Object arg1, Object arg2) {
		throw new UnsupportedOperationException();
	}

	@Override
	public void info(String format, Object... arguments) {
		throw new UnsupportedOperationException();
	}

	@Override
	public void info(String msg, Throwable t) {
		throw new UnsupportedOperationException();
	}

	@Override
	public boolean isInfoEnabled(Marker marker) {
		throw new UnsupportedOperationException();
	}

	@Override
	public void info(Marker marker, String msg) {
		throw new UnsupportedOperationException();
	}

	@Override
	public void info(Marker marker, String format, Object arg) {
		throw new UnsupportedOperationException();
	}

	@Override
	public void info(Marker marker, String format, Object arg1, Object arg2) {
		throw new UnsupportedOperationException();		
	}

	@Override
	public void info(Marker marker, String format, Object... arguments) {
		throw new UnsupportedOperationException();		
	}

	@Override
	public void info(Marker marker, String msg, Throwable t) {
		throw new UnsupportedOperationException();		
	}

	@Override
	public boolean isWarnEnabled() {
		return false;
	}

	@Override
	public void warn(String msg) {
		throw new UnsupportedOperationException();		
	}

	@Override
	public void warn(String format, Object arg) {
		throw new UnsupportedOperationException();		
	}

	@Override
	public void warn(String format, Object... arguments) {
		throw new UnsupportedOperationException();		
	}

	@Override
	public void warn(String format, Object arg1, Object arg2) {
		throw new UnsupportedOperationException();		
	}

	@Override
	public void warn(String msg, Throwable t) {
		throw new UnsupportedOperationException();		
	}

	@Override
	public boolean isWarnEnabled(Marker marker) {
		throw new UnsupportedOperationException();
	}

	@Override
	public void warn(Marker marker, String msg) {
		throw new UnsupportedOperationException();
	}

	@Override
	public void warn(Marker marker, String format, Object arg) {
		throw new UnsupportedOperationException();		
	}

	@Override
	public void warn(Marker marker, String format, Object arg1, Object arg2) {
		throw new UnsupportedOperationException();		
	}

	@Override
	public void warn(Marker marker, String format, Object... arguments) {
		throw new UnsupportedOperationException();		
	}

	@Override
	public void warn(Marker marker, String msg, Throwable t) {
		throw new UnsupportedOperationException();		
	}

	@Override
	public boolean isErrorEnabled() {
		return true;
	}

	@Override
	public void error(String msg) {
		if(isErrorEnabled()) {
			log.error(msg);			
		}
	}

	@Override
	public void error(String format, Object arg) {
		if(isErrorEnabled()) {
			log.error(format, arg);
		}
	}

	@Override
	public void error(String format, Object arg1, Object arg2) {
		throw new UnsupportedOperationException();		
	}

	@Override
	public void error(String format, Object... arguments) {
		throw new UnsupportedOperationException();		
	}

	@Override
	public void error(String msg, Throwable t) {
		throw new UnsupportedOperationException();		
	}

	@Override
	public boolean isErrorEnabled(Marker marker) {
		throw new UnsupportedOperationException();
	}

	@Override
	public void error(Marker marker, String msg) {
		throw new UnsupportedOperationException();		
	}

	@Override
	public void error(Marker marker, String format, Object arg) {
		throw new UnsupportedOperationException();		
	}

	@Override
	public void error(Marker marker, String format, Object arg1, Object arg2) {
		throw new UnsupportedOperationException();		
	}

	@Override
	public void error(Marker marker, String format, Object... arguments) {
		throw new UnsupportedOperationException();		
	}

	@Override
	public void error(Marker marker, String msg, Throwable t) {
		throw new UnsupportedOperationException();		
	}

}
